package com.ruoyi.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 台架对象 rack
 * 
 * @author qiancheng
 * @date 2025-06-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("rack")
public class Rack extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 台架ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 台架名称 */
    @Excel(name = "台架名称")
    @TableField(value = "name")
    private String name;

    /** 台架状态（1:运行、2:暂停、3:故障） */
    @Excel(name = "台架状态", readConverterExp = "1=:运行、2:暂停、3:故障")
    @TableField(value = "status")
    private Integer status;

    /** 实验时长 */
    @Excel(name = "实验时长")
    @TableField(value = "lab_time")
    private String labTime;

    /** 建成时间（台架正式投入使用日期） */
    @Excel(name = "建成时间", readConverterExp = "台=架正式投入使用日期")
    @TableField(value = "built_time")
    private Date builtTime;

    /** 所属实验台ID */
    @Excel(name = "所属实验台ID")
    @TableField(value = "lab_id")
    private Long labId;

    /** 所属实验台名称 */
    @Excel(name = "所属实验台名称")
    @TableField(value = "lab_name")
    private String labName;

    /** 所属图纸 */
    @Excel(name = "所属图纸")
    @TableField(value = "draw")
    private String draw;

    /** 台架用途 */
    @Excel(name = "台架用途")
    @TableField(value = "purpose")
    private String purpose;


}
